<div class="generated-url-container" 
    th:attr="data-source-field=*{fields['__${field.name}__'].attributes[sourceField]},
             data-toggle-field=*{fields['__${field.name}__'].attributes[toggleField]},
             data-overridden-url=*{fields['__${field.name}__'].attributes[overriddenUrl] == true}"
    th:with="overriddenUrl=*{fields['__${field.name}__'].attributes[overriddenUrl] == true}">

    <div class="field-label inline" th:text="#{${field.friendlyName}}" th:classappend="${field.required ? 'required' : ''}" />
    <div th:substituteby="components/fieldTooltip" />

    <span class="error" th:errors="*{fields['__${field.name}__'].value}" />

    <a class="override-generated-url" href="#" th:text="'(' + #{Override_Generated_URL-__${overriddenUrl ? 'enabled' : 'disabled'}__} + ')'" 
        th:unless="*{fields['__${field.name}__'].attributes[isPath]}"
        th:attr="data-enabled=${overriddenUrl},
                 data-enabled-text=${'(__#{Override_Generated_URL-enabled}__)'},
                 data-disabled-text=${'(__#{Override_Generated_URL-disabled}__)'}" />

    <a class="override-generated-url" href="#" th:text="'(' + #{Override_Generated_Path-__${overriddenUrl ? 'enabled' : 'disabled'}__} + ')'" 
        th:if="*{fields['__${field.name}__'].attributes[isPath]}"
        th:attr="data-enabled=${overriddenUrl},
                 data-enabled-text=${'(__#{Override_Generated_Path-enabled}__)'},
                 data-disabled-text=${'(__#{Override_Generated_Path-disabled}__)'}" />
    <br/>

    <input type="text" class="twelve target-field" 
        th:required="${field.required}" 
        th:placeholder="${field.hint}"
        th:field="*{fields['__${field.name}__'].value}"
        th:attr="data-prefix=*{fields['__${field.name}__'].attributes[prefix]},
                 data-allow-slash=*{fields['__${field.name}__'].attributes[allowSlash]},
                 data-prefix-selector=*{fields['__${field.name}__'].attributes['prefix-selector']}"
        th:readonly="${!overriddenUrl}" />
    
</div>